package com.htc.book;

import java.util.List;
import java.util.concurrent.ExecutionException;

import com.htc.comp.RequestSlaver;

import android.support.v7.app.ActionBarActivity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.SearchView;

public class HomeActivity extends ActionBarActivity {

	SearchView search;
	Button btn;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_home);
		
		search = (SearchView)findViewById(R.id.keyWord);
		btn = (Button)findViewById(R.id.btnTest);
		
		btn.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				String search = "Java";
				RequestSlaver slaver = new RequestSlaver(HomeActivity.this);
				slaver.execute(search);
				
			}
			
		});
	}

}
